package com.jtlrm.ckd.util.ContactList;

import com.github.promeg.pinyinhelper.Pinyin;

public abstract class SlideBarEntity {
    String initialLetter;
    String pinyin;
    String uId;
    String iId;
    String avatar;
    Long foodId;

    public Long getFoodId() {
        return foodId;
    }

    public void setFoodId(Long foodId) {
        this.foodId = foodId;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public String getuId() {
        return uId;
    }

    public void setuId(String uId) {
        this.uId = uId;
    }

    public String getiId() {
        return iId;
    }

    public void setiId(String iId) {
        this.iId = iId;
    }

    public abstract String getNameStr();

    public String getPinyin() {
        if (pinyin == null) {
            pinyin = Pinyin.toPinyin(getNameStr(), "").toLowerCase();
        }
        return pinyin;
    }

    public void setPinyin(String pinyin) {
        this.pinyin = pinyin;
    }

    public String getInitialLetter() {
        if (initialLetter == null) {
            InitialLetterUitl.setUserInitialLetter(this);
        }
        return initialLetter;
    }

    public void setInitialLetter(String initialLetter) {
        this.initialLetter = initialLetter;
    }
}
